﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Security.Cryptography;
using System.Security.Policy;

namespace MedicalSoft.Application.HIS.Util.CryptoUtil.Hash
{
    public class SHA256HashingUtil
    {

        public string Encrypt(string input)
        {
            using (SHA256 mySHA256 = SHA256.Create())
            {
                byte[] inputByte = Encoding.UTF8.GetBytes(input); 
                byte[] hashValue = mySHA256.ComputeHash(inputByte);

                return Convert.ToHexString(hashValue).ToLower();
            }
        }
    }
}
